 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

JCLOUD LOGS API
logs API

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKLogs/LogsExecutor.h>

@implementation LogsClient

@synthesize userAgent = _userAgent;
@synthesize serviceName = _serviceName;
@synthesize version = _version;

-(void) addCustomerHeaderWithKey:(NSString*) key
                           value:(NSString*) value{
    if(![self customHeader])
    {
        self.customHeader = [[NSMutableDictionary alloc] init];
    }
    if(key && value)
    {
        [[self customHeader] setValue:value forKey:key];
    }
   
}

-(id)initWithGlobalConfig{
    if(![GlobalConfig credential])
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@"GlobalConfig credential not config" userInfo:nil];
        @throw e;
    }
    self.credential = [GlobalConfig credential];
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"logs.jcloud.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 logs  v1";
    _serviceName = @"logs";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
         sdkEnvironment:(SDKEnvironment*)sdkEnvironment
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    
    if(!sdkEnvironment)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" sdkEnvironment can not null" userInfo:nil];
        @throw e;
    }else{
        self.sdkEnvironment = sdkEnvironment;
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 logs  v1";
    _serviceName = @"logs";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"logs.jcloud.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 logs  v1";
    _serviceName = @"logs";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)init{
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 logs  v1";
    _serviceName = @"logs";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}


/**
describeLogtopic sync request
@param describeLogtopicRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeLogtopicResponse` the request response data model
*/
-(NSDictionary*) describeLogtopicSyncWithRequest:(LogsDescribeLogtopicRequest*) describeLogtopicRequest
{
LogsDescribeLogtopicExecutor* excutor = [[LogsDescribeLogtopicExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeLogtopicRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogtopicResponse* response = [[LogsDescribeLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeLogtopicResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeLogtopicAsyncWithRequest:(LogsDescribeLogtopicRequest*) describeLogtopicRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeLogtopicResponse* _Nullable describeLogtopicResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeLogtopicExecutor* excutor = [[LogsDescribeLogtopicExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeLogtopicRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogtopicResponse* response = [[LogsDescribeLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeLogdCA sync request
@param describeLogdCARequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeLogdCAResponse` the request response data model
*/
-(NSDictionary*) describeLogdCASyncWithRequest:(LogsDescribeLogdCARequest*) describeLogdCARequest
{
LogsDescribeLogdCAExecutor* excutor = [[LogsDescribeLogdCAExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeLogdCARequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogdCAResponse* response = [[LogsDescribeLogdCAResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeLogdCAResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeLogdCAAsyncWithRequest:(LogsDescribeLogdCARequest*) describeLogdCARequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeLogdCAResponse* _Nullable describeLogdCAResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeLogdCAExecutor* excutor = [[LogsDescribeLogdCAExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeLogdCARequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogdCAResponse* response = [[LogsDescribeLogdCAResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeCollectResources sync request
@param describeCollectResourcesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeCollectResourcesResponse` the request response data model
*/
-(NSDictionary*) describeCollectResourcesSyncWithRequest:(LogsDescribeCollectResourcesRequest*) describeCollectResourcesRequest
{
LogsDescribeCollectResourcesExecutor* excutor = [[LogsDescribeCollectResourcesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeCollectResourcesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeCollectResourcesResponse* response = [[LogsDescribeCollectResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeCollectResourcesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeCollectResourcesAsyncWithRequest:(LogsDescribeCollectResourcesRequest*) describeCollectResourcesRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeCollectResourcesResponse* _Nullable describeCollectResourcesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeCollectResourcesExecutor* excutor = [[LogsDescribeCollectResourcesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeCollectResourcesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeCollectResourcesResponse* response = [[LogsDescribeCollectResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateLogtopic sync request
@param updateLogtopicRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateLogtopicResponse` the request response data model
*/
-(NSDictionary*) updateLogtopicSyncWithRequest:(LogsUpdateLogtopicRequest*) updateLogtopicRequest
{
LogsUpdateLogtopicExecutor* excutor = [[LogsUpdateLogtopicExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateLogtopicRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateLogtopicResponse* response = [[LogsUpdateLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateLogtopicResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateLogtopicAsyncWithRequest:(LogsUpdateLogtopicRequest*) updateLogtopicRequest
                       completionHandler:(void(^)(int statusCode,LogsUpdateLogtopicResponse* _Nullable updateLogtopicResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsUpdateLogtopicExecutor* excutor = [[LogsUpdateLogtopicExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateLogtopicRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateLogtopicResponse* response = [[LogsUpdateLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeLogsets sync request
@param describeLogsetsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeLogsetsResponse` the request response data model
*/
-(NSDictionary*) describeLogsetsSyncWithRequest:(LogsDescribeLogsetsRequest*) describeLogsetsRequest
{
LogsDescribeLogsetsExecutor* excutor = [[LogsDescribeLogsetsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeLogsetsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogsetsResponse* response = [[LogsDescribeLogsetsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeLogsetsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeLogsetsAsyncWithRequest:(LogsDescribeLogsetsRequest*) describeLogsetsRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeLogsetsResponse* _Nullable describeLogsetsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeLogsetsExecutor* excutor = [[LogsDescribeLogsetsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeLogsetsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogsetsResponse* response = [[LogsDescribeLogsetsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeMetricTasks sync request
@param describeMetricTasksRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeMetricTasksResponse` the request response data model
*/
-(NSDictionary*) describeMetricTasksSyncWithRequest:(LogsDescribeMetricTasksRequest*) describeMetricTasksRequest
{
LogsDescribeMetricTasksExecutor* excutor = [[LogsDescribeMetricTasksExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeMetricTasksRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeMetricTasksResponse* response = [[LogsDescribeMetricTasksResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeMetricTasksResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeMetricTasksAsyncWithRequest:(LogsDescribeMetricTasksRequest*) describeMetricTasksRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeMetricTasksResponse* _Nullable describeMetricTasksResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeMetricTasksExecutor* excutor = [[LogsDescribeMetricTasksExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeMetricTasksRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeMetricTasksResponse* response = [[LogsDescribeMetricTasksResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeMetricTask sync request
@param describeMetricTaskRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeMetricTaskResponse` the request response data model
*/
-(NSDictionary*) describeMetricTaskSyncWithRequest:(LogsDescribeMetricTaskRequest*) describeMetricTaskRequest
{
LogsDescribeMetricTaskExecutor* excutor = [[LogsDescribeMetricTaskExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeMetricTaskRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeMetricTaskResponse* response = [[LogsDescribeMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeMetricTaskResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeMetricTaskAsyncWithRequest:(LogsDescribeMetricTaskRequest*) describeMetricTaskRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeMetricTaskResponse* _Nullable describeMetricTaskResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeMetricTaskExecutor* excutor = [[LogsDescribeMetricTaskExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeMetricTaskRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeMetricTaskResponse* response = [[LogsDescribeMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
put sync request
@param putRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `putResponse` the request response data model
*/
-(NSDictionary*) putSyncWithRequest:(LogsPutRequest*) putRequest
{
LogsPutExecutor* excutor = [[LogsPutExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:putRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsPutResponse* response = [[LogsPutResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"putResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)putAsyncWithRequest:(LogsPutRequest*) putRequest
                       completionHandler:(void(^)(int statusCode,LogsPutResponse* _Nullable putResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsPutExecutor* excutor = [[LogsPutExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:putRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsPutResponse* response = [[LogsPutResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
searchLogContext sync request
@param searchLogContextRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `searchLogContextResponse` the request response data model
*/
-(NSDictionary*) searchLogContextSyncWithRequest:(LogsSearchLogContextRequest*) searchLogContextRequest
{
LogsSearchLogContextExecutor* excutor = [[LogsSearchLogContextExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:searchLogContextRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsSearchLogContextResponse* response = [[LogsSearchLogContextResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"searchLogContextResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)searchLogContextAsyncWithRequest:(LogsSearchLogContextRequest*) searchLogContextRequest
                       completionHandler:(void(^)(int statusCode,LogsSearchLogContextResponse* _Nullable searchLogContextResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsSearchLogContextExecutor* excutor = [[LogsSearchLogContextExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:searchLogContextRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsSearchLogContextResponse* response = [[LogsSearchLogContextResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteLogset sync request
@param deleteLogsetRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteLogsetResponse` the request response data model
*/
-(NSDictionary*) deleteLogsetSyncWithRequest:(LogsDeleteLogsetRequest*) deleteLogsetRequest
{
LogsDeleteLogsetExecutor* excutor = [[LogsDeleteLogsetExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteLogsetRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteLogsetResponse* response = [[LogsDeleteLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteLogsetResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteLogsetAsyncWithRequest:(LogsDeleteLogsetRequest*) deleteLogsetRequest
                       completionHandler:(void(^)(int statusCode,LogsDeleteLogsetResponse* _Nullable deleteLogsetResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDeleteLogsetExecutor* excutor = [[LogsDeleteLogsetExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteLogsetRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteLogsetResponse* response = [[LogsDeleteLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
search sync request
@param searchRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `searchResponse` the request response data model
*/
-(NSDictionary*) searchSyncWithRequest:(LogsSearchRequest*) searchRequest
{
LogsSearchExecutor* excutor = [[LogsSearchExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:searchRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsSearchResponse* response = [[LogsSearchResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"searchResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)searchAsyncWithRequest:(LogsSearchRequest*) searchRequest
                       completionHandler:(void(^)(int statusCode,LogsSearchResponse* _Nullable searchResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsSearchExecutor* excutor = [[LogsSearchExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:searchRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsSearchResponse* response = [[LogsSearchResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
testMetricTask sync request
@param testMetricTaskRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `testMetricTaskResponse` the request response data model
*/
-(NSDictionary*) testMetricTaskSyncWithRequest:(LogsTestMetricTaskRequest*) testMetricTaskRequest
{
LogsTestMetricTaskExecutor* excutor = [[LogsTestMetricTaskExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:testMetricTaskRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsTestMetricTaskResponse* response = [[LogsTestMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"testMetricTaskResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)testMetricTaskAsyncWithRequest:(LogsTestMetricTaskRequest*) testMetricTaskRequest
                       completionHandler:(void(^)(int statusCode,LogsTestMetricTaskResponse* _Nullable testMetricTaskResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsTestMetricTaskExecutor* excutor = [[LogsTestMetricTaskExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:testMetricTaskRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsTestMetricTaskResponse* response = [[LogsTestMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeLogset sync request
@param describeLogsetRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeLogsetResponse` the request response data model
*/
-(NSDictionary*) describeLogsetSyncWithRequest:(LogsDescribeLogsetRequest*) describeLogsetRequest
{
LogsDescribeLogsetExecutor* excutor = [[LogsDescribeLogsetExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeLogsetRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogsetResponse* response = [[LogsDescribeLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeLogsetResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeLogsetAsyncWithRequest:(LogsDescribeLogsetRequest*) describeLogsetRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeLogsetResponse* _Nullable describeLogsetResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeLogsetExecutor* excutor = [[LogsDescribeLogsetExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeLogsetRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogsetResponse* response = [[LogsDescribeLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeInstanceCollectConfs sync request
@param describeInstanceCollectConfsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeInstanceCollectConfsResponse` the request response data model
*/
-(NSDictionary*) describeInstanceCollectConfsSyncWithRequest:(LogsDescribeInstanceCollectConfsRequest*) describeInstanceCollectConfsRequest
{
LogsDescribeInstanceCollectConfsExecutor* excutor = [[LogsDescribeInstanceCollectConfsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeInstanceCollectConfsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeInstanceCollectConfsResponse* response = [[LogsDescribeInstanceCollectConfsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeInstanceCollectConfsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeInstanceCollectConfsAsyncWithRequest:(LogsDescribeInstanceCollectConfsRequest*) describeInstanceCollectConfsRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeInstanceCollectConfsResponse* _Nullable describeInstanceCollectConfsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeInstanceCollectConfsExecutor* excutor = [[LogsDescribeInstanceCollectConfsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeInstanceCollectConfsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeInstanceCollectConfsResponse* response = [[LogsDescribeInstanceCollectConfsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteLogtopic sync request
@param deleteLogtopicRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteLogtopicResponse` the request response data model
*/
-(NSDictionary*) deleteLogtopicSyncWithRequest:(LogsDeleteLogtopicRequest*) deleteLogtopicRequest
{
LogsDeleteLogtopicExecutor* excutor = [[LogsDeleteLogtopicExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteLogtopicRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteLogtopicResponse* response = [[LogsDeleteLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteLogtopicResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteLogtopicAsyncWithRequest:(LogsDeleteLogtopicRequest*) deleteLogtopicRequest
                       completionHandler:(void(^)(int statusCode,LogsDeleteLogtopicResponse* _Nullable deleteLogtopicResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDeleteLogtopicExecutor* excutor = [[LogsDeleteLogtopicExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteLogtopicRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteLogtopicResponse* response = [[LogsDeleteLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createMetricTask sync request
@param createMetricTaskRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createMetricTaskResponse` the request response data model
*/
-(NSDictionary*) createMetricTaskSyncWithRequest:(LogsCreateMetricTaskRequest*) createMetricTaskRequest
{
LogsCreateMetricTaskExecutor* excutor = [[LogsCreateMetricTaskExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createMetricTaskRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateMetricTaskResponse* response = [[LogsCreateMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createMetricTaskResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createMetricTaskAsyncWithRequest:(LogsCreateMetricTaskRequest*) createMetricTaskRequest
                       completionHandler:(void(^)(int statusCode,LogsCreateMetricTaskResponse* _Nullable createMetricTaskResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsCreateMetricTaskExecutor* excutor = [[LogsCreateMetricTaskExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createMetricTaskRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateMetricTaskResponse* response = [[LogsCreateMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateCollectInfo sync request
@param updateCollectInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateCollectInfoResponse` the request response data model
*/
-(NSDictionary*) updateCollectInfoSyncWithRequest:(LogsUpdateCollectInfoRequest*) updateCollectInfoRequest
{
LogsUpdateCollectInfoExecutor* excutor = [[LogsUpdateCollectInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateCollectInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateCollectInfoResponse* response = [[LogsUpdateCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateCollectInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateCollectInfoAsyncWithRequest:(LogsUpdateCollectInfoRequest*) updateCollectInfoRequest
                       completionHandler:(void(^)(int statusCode,LogsUpdateCollectInfoResponse* _Nullable updateCollectInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsUpdateCollectInfoExecutor* excutor = [[LogsUpdateCollectInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateCollectInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateCollectInfoResponse* response = [[LogsUpdateCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createLogset sync request
@param createLogsetRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createLogsetResponse` the request response data model
*/
-(NSDictionary*) createLogsetSyncWithRequest:(LogsCreateLogsetRequest*) createLogsetRequest
{
LogsCreateLogsetExecutor* excutor = [[LogsCreateLogsetExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createLogsetRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateLogsetResponse* response = [[LogsCreateLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createLogsetResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createLogsetAsyncWithRequest:(LogsCreateLogsetRequest*) createLogsetRequest
                       completionHandler:(void(^)(int statusCode,LogsCreateLogsetResponse* _Nullable createLogsetResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsCreateLogsetExecutor* excutor = [[LogsCreateLogsetExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createLogsetRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateLogsetResponse* response = [[LogsCreateLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateLogset sync request
@param updateLogsetRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateLogsetResponse` the request response data model
*/
-(NSDictionary*) updateLogsetSyncWithRequest:(LogsUpdateLogsetRequest*) updateLogsetRequest
{
LogsUpdateLogsetExecutor* excutor = [[LogsUpdateLogsetExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateLogsetRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateLogsetResponse* response = [[LogsUpdateLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateLogsetResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateLogsetAsyncWithRequest:(LogsUpdateLogsetRequest*) updateLogsetRequest
                       completionHandler:(void(^)(int statusCode,LogsUpdateLogsetResponse* _Nullable updateLogsetResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsUpdateLogsetExecutor* excutor = [[LogsUpdateLogsetExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateLogsetRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateLogsetResponse* response = [[LogsUpdateLogsetResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeCollectInfo sync request
@param describeCollectInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeCollectInfoResponse` the request response data model
*/
-(NSDictionary*) describeCollectInfoSyncWithRequest:(LogsDescribeCollectInfoRequest*) describeCollectInfoRequest
{
LogsDescribeCollectInfoExecutor* excutor = [[LogsDescribeCollectInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeCollectInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeCollectInfoResponse* response = [[LogsDescribeCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeCollectInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeCollectInfoAsyncWithRequest:(LogsDescribeCollectInfoRequest*) describeCollectInfoRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeCollectInfoResponse* _Nullable describeCollectInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeCollectInfoExecutor* excutor = [[LogsDescribeCollectInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeCollectInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeCollectInfoResponse* response = [[LogsDescribeCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeLogtopics sync request
@param describeLogtopicsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeLogtopicsResponse` the request response data model
*/
-(NSDictionary*) describeLogtopicsSyncWithRequest:(LogsDescribeLogtopicsRequest*) describeLogtopicsRequest
{
LogsDescribeLogtopicsExecutor* excutor = [[LogsDescribeLogtopicsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeLogtopicsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogtopicsResponse* response = [[LogsDescribeLogtopicsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeLogtopicsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeLogtopicsAsyncWithRequest:(LogsDescribeLogtopicsRequest*) describeLogtopicsRequest
                       completionHandler:(void(^)(int statusCode,LogsDescribeLogtopicsResponse* _Nullable describeLogtopicsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDescribeLogtopicsExecutor* excutor = [[LogsDescribeLogtopicsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeLogtopicsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDescribeLogtopicsResponse* response = [[LogsDescribeLogtopicsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createCollectInfo sync request
@param createCollectInfoRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createCollectInfoResponse` the request response data model
*/
-(NSDictionary*) createCollectInfoSyncWithRequest:(LogsCreateCollectInfoRequest*) createCollectInfoRequest
{
LogsCreateCollectInfoExecutor* excutor = [[LogsCreateCollectInfoExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createCollectInfoRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateCollectInfoResponse* response = [[LogsCreateCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createCollectInfoResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createCollectInfoAsyncWithRequest:(LogsCreateCollectInfoRequest*) createCollectInfoRequest
                       completionHandler:(void(^)(int statusCode,LogsCreateCollectInfoResponse* _Nullable createCollectInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsCreateCollectInfoExecutor* excutor = [[LogsCreateCollectInfoExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createCollectInfoRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateCollectInfoResponse* response = [[LogsCreateCollectInfoResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateMetricTask sync request
@param updateMetricTaskRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateMetricTaskResponse` the request response data model
*/
-(NSDictionary*) updateMetricTaskSyncWithRequest:(LogsUpdateMetricTaskRequest*) updateMetricTaskRequest
{
LogsUpdateMetricTaskExecutor* excutor = [[LogsUpdateMetricTaskExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateMetricTaskRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateMetricTaskResponse* response = [[LogsUpdateMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateMetricTaskResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateMetricTaskAsyncWithRequest:(LogsUpdateMetricTaskRequest*) updateMetricTaskRequest
                       completionHandler:(void(^)(int statusCode,LogsUpdateMetricTaskResponse* _Nullable updateMetricTaskResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsUpdateMetricTaskExecutor* excutor = [[LogsUpdateMetricTaskExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateMetricTaskRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateMetricTaskResponse* response = [[LogsUpdateMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteMetricTask sync request
@param deleteMetricTaskRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteMetricTaskResponse` the request response data model
*/
-(NSDictionary*) deleteMetricTaskSyncWithRequest:(LogsDeleteMetricTaskRequest*) deleteMetricTaskRequest
{
LogsDeleteMetricTaskExecutor* excutor = [[LogsDeleteMetricTaskExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteMetricTaskRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteMetricTaskResponse* response = [[LogsDeleteMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteMetricTaskResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteMetricTaskAsyncWithRequest:(LogsDeleteMetricTaskRequest*) deleteMetricTaskRequest
                       completionHandler:(void(^)(int statusCode,LogsDeleteMetricTaskResponse* _Nullable deleteMetricTaskResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsDeleteMetricTaskExecutor* excutor = [[LogsDeleteMetricTaskExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteMetricTaskRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsDeleteMetricTaskResponse* response = [[LogsDeleteMetricTaskResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
updateCollectResources sync request
@param updateCollectResourcesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `updateCollectResourcesResponse` the request response data model
*/
-(NSDictionary*) updateCollectResourcesSyncWithRequest:(LogsUpdateCollectResourcesRequest*) updateCollectResourcesRequest
{
LogsUpdateCollectResourcesExecutor* excutor = [[LogsUpdateCollectResourcesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:updateCollectResourcesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateCollectResourcesResponse* response = [[LogsUpdateCollectResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"updateCollectResourcesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)updateCollectResourcesAsyncWithRequest:(LogsUpdateCollectResourcesRequest*) updateCollectResourcesRequest
                       completionHandler:(void(^)(int statusCode,LogsUpdateCollectResourcesResponse* _Nullable updateCollectResourcesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsUpdateCollectResourcesExecutor* excutor = [[LogsUpdateCollectResourcesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:updateCollectResourcesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsUpdateCollectResourcesResponse* response = [[LogsUpdateCollectResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
createLogtopic sync request
@param createLogtopicRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createLogtopicResponse` the request response data model
*/
-(NSDictionary*) createLogtopicSyncWithRequest:(LogsCreateLogtopicRequest*) createLogtopicRequest
{
LogsCreateLogtopicExecutor* excutor = [[LogsCreateLogtopicExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createLogtopicRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateLogtopicResponse* response = [[LogsCreateLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createLogtopicResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createLogtopicAsyncWithRequest:(LogsCreateLogtopicRequest*) createLogtopicRequest
                       completionHandler:(void(^)(int statusCode,LogsCreateLogtopicResponse* _Nullable createLogtopicResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
LogsCreateLogtopicExecutor* excutor = [[LogsCreateLogtopicExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createLogtopicRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    LogsCreateLogtopicResponse* response = [[LogsCreateLogtopicResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}


 /**
 logs common sync request
 @param  jdcloudDataRequest request param
 @return key `statusCode` http request status code type is int
             `dataResult` the http request response data  type is NSData
             `requestError` the request error type is NSError
 */
 -(NSDictionary*) logsCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                                   url:(NSString*) url
                                                method:(NSString*) method{
    CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    NSDictionary* responseResult = [excutor executeDataSync:jdcloudDataRequest];
    return responseResult;
}

-(void)logsCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                         url:(NSString*) url
                                      method:(NSString*) method
                           completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
     CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    
    [excutor executeDataAsync:jdcloudDataRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        completionHandler(statusCode,responseData,error);
    }];
} 

@end
